home *** CD-ROM | disk | FTP | other *** search
- // ============================================================
- // LeaRNWaRe code by CROM / Spanish Lords
- // - since 1993 -
- //
- // Objetivo : Manejo de un buffer canalizado - Polling.
- // Autor : Pedro Ant≤n Alonso. crom@ergos.es
- // Plataforma : Windows 95 / NT & Direct X
- // Compilador : Visual C++ 6.0
- //
- // ============================================================
-
- #ifndef DSOUND_LEARNWARE_UTILES_H
- #define DSOUND_LEARNWARE_UTILES_H
-
- #include <stdio.h>
- #include <dsound.h>
- #include "wave.h"
- #include "resource.h"
-
- class CDSUtil
- {
- public:
- BOOL bPlaying;
-
- private:
- LPDIRECTSOUND lpDS;
- LPDIRECTSOUNDBUFFER lpDSB;
- WAVEFORMATEX *pWaveFormat;
- HMMIO hmmio;
- MMCKINFO mmckInfo, mmckInfoParent;
- DWORD dwMiddleBuffer;
- DWORD dwLastPlayPos;
-
- public:
- BOOL Init (HWND hwnd,HINSTANCE hinst,GUID *pguid);
- void End ();
- BOOL Play ();
- void StartPlay ();
- void StopPlay ();
- BOOL LoadWavInBuffer (LPSTR FileName);
-
- private:
- BOOL ClearBuffer ();
- };
-
- #endif